<template>
  <h1>App</h1>
  <p>{{ counterStore.count }}</p>
  <p>{{ counterStore.doubleCount }}</p>
  <button @click="counterStore.increment()">增加</button>

  <hr />

  <HelloWorld />
</template>

<script setup>
import HelloWorld from './components/HelloWorld.vue'

// 1. 引入对应的仓库组合式函数
import { useCounterStore } from './stores/counter'

// 2. 调用该组合式函数
const counterStore = useCounterStore()

// 3. 看看 store 的内容
console.log('counterStore', counterStore)
</script>
